const { Controller } = require('varal');
const { sequelize } = require('../../models');
const { QueryTypes } = require('sequelize');

class HomeController extends Controller {
	async index() {
		//获取车辆图片
		/*
		const data = await sequelize.query(`select
		a1.*
		from app_article a1
		where (select count(id) row from app_article a2 where a1.category_id=a2.category_id and a1.id<a2.id) < 6
		and category_id in(${categoryIds.join(',')})`, { type: QueryTypes.SELECT });
		*/

		this.app.json({
			err_code: 0
		});
	}

	async debug() {
		return {};
	}
}

exports = module.exports = HomeController;
